package builder.pattern.demo;


import java.util.LinkedList;

/**
 * 描述:
 * 产品类
 *
 * @author 逸足天涯
 * @create 2019-10-12 18:30
 */
public class Product {
    private LinkedList<String> parts ;

    public Product() {
        parts = new LinkedList<>();
    }



    public void add(String part){
        parts.addLast(part);
    }
    public void show(){
        System.out.println("\nProduct complete as below:");
        for (int i = 0; i < parts.size(); i++) {
            System.out.println(parts.get(i));
        }
    }
}